/*
 * date: 2009-11-20 
 * author: Maciej Smolenski <jezdnia@gmail.com>
 */
#include "common.hpp"
#include "rpc_monitor.hpp"

namespace rm=rpc_monitor;

void test()
{
	rm::stdset s1; 
	rm::stdset s2; 
	fill(s1, 20);
	fill(s2, 200);

	rm::rpc_monitor_service<shmda_owner<rm::rpc_monitor> > owner(SHARE_NAME, SHARE_SIZE);
	for(int i=0;i<1<<9;i++)
	{
		if (owner.set_services(s1)==result_failure) PR_EXIT("owner.get_services", EXIT_FAILURE);	
		if (owner.set_services(s2)==result_failure) PR_EXIT("owner.set_services", EXIT_FAILURE);	
	}
}

int main(int argc, char *argv[])
{
	test();
	return 0;
}

